package com.oyo.common.enums;

/**
 * 消费类型
 */
public enum BillType {
    EARLY_CHECKIN(0, "提前入住"),
    LATE_CHECKOUT(1, "延迟离店"),
    EARLY_CHECKOUT(2, "提前离店"),
    CANCELLATION(3, "取消"),
    FOOD_AND_BEVERAGES(4, "食物和饮料"),
    CAB(5, "出租车"),
    OTHERS(6, "其他"),
    NO_SHOW(7, "NO SHOW"),
    ROOM_UPGRADE(8, "房间升级"),
    ELECTRICITY(9, "电费"),
    NOTICE_PERIOD_CHARGES(10, "通知"),
    LATE_PAYMENT_CHARGES(11, "逾期费用"),
    REGISTRATION_FEES(12, "登记费"),
    TOKEN_AMOUNT(13, "TOKEN_AMOUNT"),
    SECURITY_DEPOSIT_TRANSFERABLE(14, "押金可转让"),
    SECURITY_DEPOSIT_NON_TRANSFERABLE(15, "押金不可转让"),
    SERVICE_CHARGES(16, "服务费"),
    PROPERTY_DAMAGE(17, "财产损失费"),
    BANQUET_HALL(18, "宴会厅"),
    CONFERENCE_HALL(19, "会议大厅"),
    PARTY_HALL(20, "宴会大厅"),
    LAUNDRY(21, "洗衣房"),
    SECURITY_DEPOSIT(22, "押金"),
    ELECTRICITY_ESTIMATED(23, "预估电费"),
    ELECTRICITY_ACTUAL(24, "实际电费"),
    SECURITY_DEPOSIT_REFUND(25, "押金退还"),
    SNACKS(26, "快餐"),
    LIQUOR(27, "酒"),
    CHANNEL_CHARGES(28, "通道费用"),
    OYO_BRANDING_FEE(29, "oyo品牌费"),
    CONVENIENCE_FEE(30, "便利费"),
    ROOM_COST(999, "房费"),
    ROOM_REFUND(1000, "退款");

    Integer code;
    String name;

    BillType(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static String fromCode(Integer code) {
        BillType[] types = values();
        for (BillType type : types) {
            if (type.getCode().equals(code)) {
                return type.getName();
            }
        }
        return null;
    }

}
